﻿<UserControl x:Class="Scarecrow_Network_Manager.ProfileControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             DataContext="{Binding RelativeSource={RelativeSource Self}}"
             mc:Ignorable="d" Opacity="0" Foreground="Transparent" Background="Transparent" BorderThickness="2" BorderBrush="Black"
             ToolTipService.Placement="Right" Height="128" Width="128">
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter">
            <BeginStoryboard>
                <Storyboard TargetProperty="BorderBrush.Color">
                    <ColorAnimation To="DarkBlue" Duration="0:0:0.5"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave">
            <BeginStoryboard>
                <Storyboard TargetProperty="BorderBrush.Color" >
                    <ColorAnimation To="Black" Duration="0:0:0.25"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
        <EventTrigger RoutedEvent="Loaded">
            <BeginStoryboard>
                <Storyboard TargetProperty="Opacity" >
                    <DoubleAnimation To="1" Duration="0:0:0.5"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </UserControl.Triggers>
    <UserControl.ToolTip>
        <ToolTip Background="Black" BorderThickness="2" BorderBrush="SteelBlue" >
            <ListView Name="lstData" ItemsSource="{Binding ProfileWatcher}" TextElement.FontSize="10" Background="Black" BorderThickness="0" Foreground="White">
                <ListView.View>
                    <GridView>
                        <GridView.ColumnHeaderContainerStyle>
                            <Style>
                                <Setter Property="FrameworkElement.Visibility" Value="Collapsed"/>
                            </Style>
                        </GridView.ColumnHeaderContainerStyle>
                        <GridViewColumn DisplayMemberBinding="{Binding Field}"/>
                        <GridViewColumn DisplayMemberBinding="{Binding Value}"/>
                    </GridView>
                </ListView.View>
            </ListView>
        </ToolTip>
        
    </UserControl.ToolTip>
        <StackPanel Background="Black" Height="128" Width="128">
            <StackPanel Orientation="Horizontal">
                <Image Name="imgImage" Width="64" Height="64" Margin="32,0,0,0"/>
            <Image Style="{StaticResource BookmarkIcon}" Opacity="0.25" Name="imgBookmark" Width="16" Height="16" Margin="12,-47,0,0" Source="/Scarecrow%20Network%20Manager;component/Images/System/Bookmark.png" MouseDown="imgBookmark_MouseDown" MouseUp="imgBookmark_MouseUp" />
        </StackPanel>
            <TextBlock Name="txtTitle" Foreground="White" TextAlignment="Center" HorizontalAlignment="Center" FontSize="16" TextWrapping="Wrap" Width="128"></TextBlock>
        </StackPanel>
</UserControl>